﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace SmartMathLibrary.Storage
{
    /// <summary>
    /// This class represents a weak storage point in a plane space.
    /// </summary>
    [Serializable]
    public class WeakPointStorageData
    {
        /// <summary>
        /// The position data of the point.
        /// </summary>
        private StoragePoint positionData;

        /// <summary>
        /// Initializes a new instance of the <see cref="WeakPointStorageData"/> class.
        /// </summary>
        /// <param name="point">The storage point to clone.</param>
        public WeakPointStorageData(StoragePoint point)
        {
            this.positionData = point;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="WeakPointStorageData"/> class.
        /// </summary>
        /// <param name="point">The storage point to clone.</param>
        public WeakPointStorageData(Point point)
        {
            this.positionData = new StoragePoint(point.X, point.Y);
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="WeakPointStorageData"/> class.
        /// </summary>
        /// <param name="x">The x position of the point.</param>
        /// <param name="y">The y position of the point.</param>
        public WeakPointStorageData(double x, double y)
        {
            this.positionData = new StoragePoint(x, y);
        }

        /// <summary>
        /// Gets or sets the position data of the WeakPointStorage.
        /// </summary>
        /// <value>The position data of the WeakPointStorage.</value>
        public StoragePoint PositionData
        {
            get { return positionData; }
            set { positionData = value; }
        }
    }
}